home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Macintosh Memory / HeapZone.cp < prev    next >
Text File  |  2000-06-23  |  646b  |  35 lines

  1. // HeapZone.cp
  2.  
  3. #ifndef HeapZone_h
  4. #include "HeapZone.h"
  5. #endif
  6. #ifndef MemoryError_h
  7. #include "MemoryError.h"
  8. #endif
  9.  
  10. HeapZone& HeapZone::Application()
  11.   {
  12.     static HeapZone& applicationZone( Bless( ApplicationZone() ) );
  13.     return applicationZone;
  14.   }
  15.  
  16. HeapZone& HeapZone::System()
  17.   {
  18.     static HeapZone& systemZone( Bless( SystemZone() ) );
  19.     return systemZone;
  20.   }
  21.  
  22. HeapZone& HeapZone::ZoneOfPointer( void *p )
  23.   {
  24.     THz result = PtrZone( (Ptr)p );
  25.     MemoryError::ThrowCurrent();
  26.     return Bless( result );
  27.   }
  28.  
  29. HeapZone& HeapZone::ZoneOfHandle( Handle h )
  30.   {
  31.     THz result = HandleZone( h );
  32.     MemoryError::ThrowCurrent();
  33.     return Bless( result );
  34.   }
  35.